#include "stdafx.h"
#include "ThreadManager.h"

namespace Core
{
	void ThreadManager::ExecuteByInterval()
	{
		for(std::vector<Timer*>::iterator p=m_Threads.begin(); p!=m_Threads.end(); p++)
		{
			(*p)->TryExecute();
		}
	}

	void ThreadManager::AddTimer(Timer* p_Timer, unsigned long p_Interval)
	{
		p_Timer->SetInterval(p_Interval);
		m_Threads.push_back(p_Timer);
	}
}
